import Vue from 'vue';
import App from './App.vue';
import router from './router';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'; // 默认主题
// import './assets/css/theme-green/index.css'; // 浅绿色主题
import './assets/css/icon.css';
import 'babel-polyfill';
import '@/mock/index'

import * as echarts from "echarts"
Vue.prototype.$echarts = echarts

import jsMind from "jsmind"
import 'jsmind/style/jsmind.css'
Vue.prototype.$jsMind = jsMind
import 'default-passive-events'
import promptMessages from '@/components/messages';
Vue.use(promptMessages); // 表头提示自定义提示信息组件
Vue.config.productionTip = false;

Vue.use(ElementUI, {
    size: 'small'
});


//使用钩子函数对路由进行权限跳转
// router.beforeEach((to, from, next) => {
//     document.title = `${to.meta.title} | 昆明市第一人民医院甘美医院`;
//     const role = localStorage.getItem('ms_username');
//     if (!role && to.path !== '/login') {
//         next('/login');
//     }else {
//         next();
//     }
// });

new Vue({
    router,
    render: h => h(App)
}).$mount('#app');
